package com.ktwlsoft.archivemanage.domain.business.repositoryService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.IBasisBusinessManageMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.BasisBusinessManage;

/**
 * basis_business_manage--依据业务管理业务层接口实现类
 *
 * @author zhuhe on 2020-04-29 11:24:44
 * @version 1.0
 */
@Service
public class BasisBusinessManageRepositoryService {
	
	@Autowired
	private IBasisBusinessManageMapper basisBusinessManageMapper;

    /**
 	 * 查询分页 on 2020-04-29 11:24:44
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param basisBusinessManage basisBusinessManage
 	 * @return PageInfo<BasisBusinessManage>
 	 */
	public PageInfo<BasisBusinessManage> findPage(int pn,int pageSize,BasisBusinessManage basisBusinessManage) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<BasisBusinessManage> pageInfo = new PageInfo<BasisBusinessManage>(basisBusinessManageMapper.findList(basisBusinessManage));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2020-04-29 11:24:44
	 * @param basisBusinessManage basisBusinessManage
	 * @return List<BasisBusinessManage>
	 */
	public List<BasisBusinessManage> findList(BasisBusinessManage basisBusinessManage) {
		return basisBusinessManageMapper.findList(basisBusinessManage);
	}

    /**
	 * 根据ID查询信息 on 2020-04-29 11:24:44
	 * @param id	主键
	 * @return BasisBusinessManage
	 */
	public BasisBusinessManage getById(Long id){
		return basisBusinessManageMapper.getById(id);
	}

   /**
	 * 新增 on 2020-04-29 11:24:44
	 * @param basisBusinessManage basisBusinessManage
	 * @return int
	 */
	public int insert(BasisBusinessManage basisBusinessManage){
		return basisBusinessManageMapper.insert(basisBusinessManage);
	}

	/**
	 * 批量插入 2020-04-29 11:24:44
	 *
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<BasisBusinessManage> list){
	    return basisBusinessManageMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2020-04-29 11:24:44
	 * @param basisBusinessManage basisBusinessManage
	 * @return int
	 */
	public int update(BasisBusinessManage basisBusinessManage){
		return basisBusinessManageMapper.update(basisBusinessManage);
	}

   /**
	 * 根据id集合批量删除信息 on 2020-04-29 11:24:44
	 * @param basisBusinessManageArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> basisBusinessManageArr){
		return basisBusinessManageMapper.deleteByIds(basisBusinessManageArr);
	}

   /**
	 * 根据id删除信息 on 2020-04-29 11:24:44
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return basisBusinessManageMapper.deleteById(id);
	}
}
